<template>
  <div class="goods">
    <!-- <h2>goods</h2> -->
    <PageContent :tableConfig="tableConfig" pageName="goods">
      <template #imgUrl="scope">
        <el-image
          :src="scope.row.imgUrl"
          :style="{ width: '60px', height: '60px' }"
          :preview-teleported="true"
          :preview-src-list="[scope.row.imgUrl]"
        />
      </template>
      <template #status="scope">
        <el-button plain :type="scope.row.status ? 'success' : 'danger'">
          {{ scope.row.status ? '上架' : '下架' }}
        </el-button>
      </template>
    </PageContent>
  </div>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'
import PageContent from '@/components/page-content'
import { useTableConfig } from './config/configTable'

const tableConfig = reactive(useTableConfig())
</script>

<style scoped></style>
